package com.yupi.yuaiagent.tools;

import com.yupi.yuaiagent.agent.model.TerminateTool;
import com.yupi.yuaiagent.rag.LoveAppDocumentLoader;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.ai.tool.ToolCallbacks;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ToolRegistration {

    @Value("${search-api.api-key}")
    private String searchAPiKey;

    @Bean
    public ToolCallback[] allTools() {
        return ToolCallbacks.from(
                new PDFGenerationTool(),
                new ResourceDownloadTool(),
                new TerminalOperationTool(),
                new WebScrapingTool(),
                new WebSearchTool(searchAPiKey),
                new FileOperationTool(),
                new TerminateTool()
        );
    }
}
